home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ETO Development Tools 4
/
ETO Development Tools 4.iso
/
Tools - Objects
/
Virtual User 1.0
/
Virtual User
/
MPW Scripts
/
PickTargetZone_vu
< prev
next >
Wrap
Text File
|
1991-01-25
|
1KB
|
49 lines
#
# File: PickTarget_vu
#
# Contains: This script lets the user pick a target zone through a simple dialog.
# It searches for all accessible zones and collects them in a list.
# This list is presented to the user and the user is asked to select
# one of the zone.
#
#
# Written by: Chad Williams
#
# Copyright: © 1989-91 by Apple Computer, Inc., all rights reserved.
#
# Change History:
#
# 1/9/91 chad creation
#
SET Exit 0
SET TempVar ''
SET TargetList "`choose '≈:' -list ≥ "Dev:Null"`"
IF ("{TargetList}" == '')
ALERT "∂nThis network has only one zone.∂nThe Target Zone is being set to this zone."
SET VUTargetZone "*"
TARGET "{VUSettings}"
FIND 1
ECHO "*" > §
CLOSE -y "{VUSettings}"
EXIT 0
END
SET TempVar "`getlistitem -s -q {TargetList} ≥ "Dev:Null"`"
IF ("{TempVar}" != '')
Set Tempzone `Evaluate "{TempVar}" =~ /∂'(≈)®1∂'/`
IF ({Tempzone} != 0)
Set Tempzone "{®1}"
ELSE
Set Tempzone "{TempVar}"
END #remove single quotes if present
SET VUTargetZone "{Tempzone}"
TARGET "{VUSettings}"
FIND 1
ECHO "{Tempzone}" > §
CLOSE -y "{VUSettings}"
END